<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
      <div id="buttonContainer">
        <button id="backButton" onclick="goBack()">返回前一页</button>
        <button id="reloadButton" onclick="reload()">刷新本页(无效)</button>
        <button id="forwardButton" onclick="goForward()">进入下一页</button>
      </div>
      
    <div onclick="onJump()">点击跳转test1</div>
    <div onclick="onJump2()">点击跳转test2</div>
    <div id="test"></div>
  </body>
  <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
  <script>
    let vConsole = new VConsole();
    
    function reload() {
      window.location.reload();
    }
      
    function goBack() {
      window.history.back();
    }

    function goForward() {
      window.history.forward();
    }

    function onJump() {
      console.log("点击跳转test1");
      fisrtPageCounter = Math.floor(Math.random() * 1000); // 生成一个 0 到 999 的随机数

      var page = './dvlp_mini_program_demo_JavascriptBridge.html?title=1first&randomNum=' + fisrtPageCounter;
      
      // window.location.href = 'test.html?title=点击跳转test1'
      window.open("dvlp_mini_program_user_page_JavascriptBridge.html?title=点击跳转test1");
      document.getElementById('test').innerHTML='我是页面test1'
    }
    function onJump2() {
      console.log("点击跳转test2");
      window.location.href = "dvlp_mini_program_user_page_JavascriptBridge.html?title=点击跳转test2";
      document.getElementById('test').innerHTML='我是页面test2'
    }
  </script>
</html>
